package cn.net.wanji.entity;

public enum IdentifyTypeEnum {
    A(1, "一型客车"),
    B(2, "二型客车"),
    C(3, "三型客车"),
    D(4, "四型客车"),
    E(11, "一型货车"),
    F(12, "二型货车"),
    G(13, "三型货车"),
    H(14, "四型货车"),
    I(15, "五型货车"),
    J(16, "六型货车"),
    K(21, "一型专项作业车"),
    L(22, "二型专项作业车"),
    M(23, "三型专项作业车"),
    N(24, "四型专项作业车"),
    O(25, "五型专项作业车"),
    P(26, "六型专项作业车");


    private final int number;
    private final String value;

    IdentifyTypeEnum(int number, String value) {
        this.number = number;
        this.value = value;
    }

    public int getNumber() {
        return number;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByNumber(int number) {
        for (IdentifyTypeEnum enumValue : IdentifyTypeEnum.values()) {
            if (enumValue.getNumber() == number) {
                return enumValue.getValue();
            }
        }
        return null; // 如果没有匹配的值，可以返回null或者其他默认值
    }

    public static void main(String[] args) {
        String valueByNumber = getValueByNumber(1);
        System.out.println(valueByNumber);
    }

}
